import http from "../../utils/http"
//用户分组
export interface RoleItem{
_id:string;
name:string;
state:boolean;
action:string;
permissions:string[]
}

const roles = {
    // 查询用户分组数据
    search: (data?: pagequery) => http.post('/roles/search', data),
    // 新增用户分组数据
    add: (data:Partial<RoleItem>) => http.post('/roles/add', data),
    // 删除用户分组数据
    remove: (data:deleteparams ) => http.delete('/roles/remove', data),
    // 修改用户分组数据
    update: (data:Partial<RoleItem>) => http.put('/roles/update', data)
}
export default roles;